package com.framework.loippi.entity;

import java.util.Date;

import com.framework.loippi.mybatis.eitity.GenericEntity;
import com.framework.loippi.mybatis.ext.annotation.Column;
import com.framework.loippi.mybatis.ext.annotation.Table;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * Entity - 广告
 * 
 * @author Loippi Team
 * @version 1.0
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "T_JW_AD")
public class Ad implements GenericEntity {
	private static final long serialVersionUID = 5081846432919091193L;

	/** ID */
	@Column(id = true, name = "ID", updatable = false)
	@ApiModelProperty(value = "ID")
	private Long id;

	/** 创建时间 */
	@Column(name = "CREATE_DATE")
	@ApiModelProperty(value = "创建时间")
	private Date createDate;

	/** 排序 */
	@Column(name = "SORTS")
	@ApiModelProperty(value = "排序")
	private Integer sorts = 0;

	/** 连接 */
	@Column(name = "URL")
	@ApiModelProperty("链接地址")
	private String url;

	/** 标题 */
	@Column(name = "TITLE")
	@ApiModelProperty(value = "标题")
	private String title;
	
	/** 图片 */
	@Column(name = "IMAGE")
	@ApiModelProperty(value = "图片")
	private String image;

	/** 开始时间 */
	@Column(name = "START_DATE")
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	@ApiModelProperty(value = "开始时间")
	private Date startDate;

	/** 结束时间 */
	@Column(name = "END_DATE")
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	@ApiModelProperty(value = "结束时间")
	private Date endDate;

	/** 创建者 */
	@Column(name = "CREATOR")
	@ApiModelProperty(value = "创建者")
	private Long creator;
	
	/** 广告类型（1-外部链接2-图文详情3-商品详情4-专题） */
	@Column(name = "type")
	@ApiModelProperty(value = "0-未配置 1-外部链接 2-图文详情 3-商品详情 4-专题 5-分类")
	private Integer type;
	
	/** 商品ID */
	@Column(name = "goodsId")
	@ApiModelProperty(value = "商品id")
	private Long goodsId;
	
	/** 图文详情 */
	@Column(name = "content")
	@ApiModelProperty(value = "图文详情")
	private String content;

	/** 广告位置(1个人中心-2-报价banner图)*/
	@Column(name = "position")
	@ApiModelProperty(value = "广告位置1-首页banner 2爱仓优选,3优品上线4口碑热销 5猜你喜欢")
	private String position;
	/**状态(1-未开始2-进行中3-已结束) */
	@Column(name = "status")
	@ApiModelProperty(value = "状态(1进行中,2未开始,3已结束)")
	private Integer status;

	/** 栏目id*/
	@Column(name = "column_id")
	@ApiModelProperty(value = "栏目id")
	private Long columnId;

	@Column(name = "category_id")
	@ApiModelProperty(value = "分类id")
	private Long categoryId;

	@ApiModelProperty(value = "分类名称")
	private String categoryName;

	@ApiModelProperty(value = "分类级别")
	private Integer categoryLevels;

	@ApiModelProperty(value = "上级分类ID")
	private Long categoryParentId;
}
